package com.gaswell.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gaswell.pojo.Qj;
import com.gaswell.vo.QjVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface QjMapper extends EasyBaseMapper<Qj> {
    @Select("select ywbh from qj ")
    List<String> findAllJh();

    @Select("select ywbh from qj where ym=#{ym}")
    List<String> findJhByYm(@Param("ym") String ym);

//    @Select("select zwbh,ywbh from allqj where ym=#{ym}")
//    List<QjVo> findZwbhAndYwbhByYm(@Param("ym") String ym);
//
//    @Select("select zwbh,ywbh from allqj where scq in #{scq}")
//    List<QjVo> findZwbhAndYwbhByScq(@Param("scq") List<String> scq);
//
//    @Select("select zwbh,ywbh from allqj where zm in #{zm}")
//    List<QjVo> findZwbhAndYwbhByZm(@Param("zm") List<String> zm);
//
//    @Select("select zwbh,ywbh from allqj where ym in #{ym}")
//    List<QjVo> findZwbhAndYwbhByYms(@Param("ym") List<String> ym);
//
//    @Select("select * from cyqj union all select * from dqqj")
//    IPage<Qj> findAllFromView(Page<Qj> qjIPage);


    @Select("select ywbh from qj where sfszhjs=1 and ym='大庆'")
    List<String> findAllYwbhSzhjh();

    @Select("select zwbh from qj where sfszhjs=1 and ym='川渝'")
    List<String> findAllZwbhSzhjh();
}
